import request from '@/utils/request'

// 查询车辆预约列表
export function listAppoint(query) {
  return request({
    url: '/bus/appoint/list',
    method: 'get',
    params: query
  })
}

// 查询车辆预约详细
export function getAppoint(appointId) {
  return request({
    url: '/bus/appoint/' + appointId,
    method: 'get'
  })
}

// 新增车辆预约
export function addAppoint(data) {
  return request({
    url: '/bus/appoint',
    method: 'post',
    data: data
  })
}

// 修改车辆预约
export function updateAppoint(data) {
  return request({
    url: '/bus/appoint',
    method: 'put',
    data: data
  })
}

// 删除车辆预约
export function delAppoint(appointId) {
  return request({
    url: '/bus/appoint/' + appointId,
    method: 'delete'
  })
}

// 导出车辆预约
export function exportAppoint(query) {
  return request({
    url: '/bus/appoint/export',
    method: 'get',
    params: query
  })
}